import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  base : process.env.BASE_URL,
  routes : [{
    path : '/',
    name : 'Layout',
    redirect :'/home',
    level : 1,
    component : () => import('../views/layout/layout.vue'),
    children : [{
      name : 'home',
      path : 'home',
      showname : '首页',
      component : () => import('../views/home/index.vue')
    }]
  }, {
    path : '/micro',
    name : 'Layout',
    redirect :'/micro/index',
    level : 1,
    component : () => import('../views/layout/layout.vue'),
    children : [{
      name : 'micro',
      path : 'index',
      showname : '基层空间查询',
      component : () => import('../views/micro/index.vue')
    }]
  }, {
    path : '/statistics',
    name : 'Layout',
    redirect :'/statistics/month_data',
    level : 2,
    component : () => import('../views/layout/layout.vue'),
    showname : '统计分析',
    children : [{
        name : 'month_data',
        path : 'month_data',
        showname : '月度数据查询',
        component : () => import('../views/statistics/month_data/index.vue')
      }, {
        name : 'year_data',
        path : 'year_data',
        showname : '年度数据查询',
        component : () => import('../views/statistics/year_data/index.vue')
    }]
  },
  {
    path : '/bigscreen',
    name : 'bigscreen',
    redirect :'/bigscreen/medical_reform_detection',
    level : 2,
    component : () => import('../views/layout/screen.vue'),
    showname : '专题大屏',
    children : [{
        name : 'medical_reform_detection',
        path : 'medical_reform_detection',
        hiddenheader: true,
        showname : '医改检测',
        component : () => import('../views/bigscreen/medical_reform_detection.vue')
      },{
        name : 'medical_service',
        path : 'medical_service',
        showname : '医疗服务与居民健康',
        component : () => import('../views/bigscreen/medical_service.vue')
      },{
        name : 'health_resource',
        path : 'health_resource',
        showname : '卫生资源',
        component : () => import('../views/bigscreen/health_resource.vue')
      }]
  }]
})
